FROM osrf/ros:indigo-desktop-full

MAINTAINER LM <lm.91@qq.com>

# 更换源
RUN sudo sed -i 's/archive.ubuntu.com/mirrors.aliyun.com/g' /etc/apt/sources.list

# 添加 ros 管理员用户，密码为 ros
RUN DOCKER_ENCRYPYTED_PASSWORD=`perl -e 'print crypt('"ros"', "aa"),"\n"'` && \
    useradd -m -d /home/ros -p $DOCKER_ENCRYPYTED_PASSWORD ros && \
    sed -Ei 's/adm:x:4:/ros:x:4:ros/' /etc/group && \
    adduser ros sudo && \
    chmod a=rx,u+ws /usr/bin/sudo

# Nao 换源
RUN sudo sed -i 's/packages.ros.org/mirror-ap.packages.ros.org/g' /etc/apt/sources.list.d/ros-latest.list

RUN sudo rm -rf /var/lib/apt/lists/* && apt-get update ||:

# 安装 Nao 工具包
RUN apt-get install -y ros-indigo-driver-base \
    ros-indigo-move-base-msgs \
    ros-indigo-octomap ros-indigo-octomap-msgs ros-indigo-humanoid-msgs  \
    ros-indigo-humanoid-nav-msgs ros-indigo-camera-info-manager  \
    ros-indigo-camera-info-manager-py ros-indigo-nao-robot \
    ros-indigo-ros-control ros-indigo-nao-control \
    ros-indigo-nao-gazebo-plugin \
    ros-indigo-nao-moveit-config


VOLUME /home/ros
VOLUME /naoqi

EXPOSE 22
